mcheck: Small fix for CMCI Threshold set problem.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 30 Mar 2010 07:32:34 +0000 (08:32 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 30 Mar 2010 07:32:34 +0000 (08:32 +0100)
When generating new threshold value, we must firstly clean old value
before or the new set value since the new value might be different
with the old (BIOS might pre-set some threshold).

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Ying Huang <ying.huang@intel.com>
xen/arch/x86/cpu/mcheck/mce_intel.c

index 9e56df9ca9b0bf1e8621fc8fa76adfa4db76bcb1..0eefd9263c36bd22d9aada27188db42120dfdebe 100644 (file)
@@ -824,6 +824,8 @@ static int do_cmci_discover(int i)
         clear_bit(i, __get_cpu_var(mce_banks_owned));
         goto out;
     }
+
+    val &= ~CMCI_THRESHOLD_MASK;
     wrmsrl(msr, val | CMCI_EN | CMCI_THRESHOLD);
     rdmsrl(msr, val);